from django.db import models

# Create your models here.

class User(models.Model):
    # models.CharField 数据库 varchar 表的设置 max_length必须设置 其他设置可选
    username = models.CharField(max_length=20,null=False,verbose_name="用户名", db_column="name")
    password = models.CharField(max_length=20,verbose_name="密码")

    class Meta:
        db_table = 'py_model'  # 修改表名


class Xhello(models.Model):
    # models.CharField 数据库 varchar 表的设置 max_length必须设置 其他设置可选
    name = models.CharField(max_length=10)
    birth = models.DateTimeField()